package com.xr.core.system.common.base;

import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * 请求参数基础类、带分页参数
 *
 * @param <T>
 */
@Accessors(chain = true)
@Data
public class BaseRequest<T> implements Serializable {

    private static final long serialVersionUID = 1569265348776042374L;

    private long current;

    private long size;

    /**
     * 封装分页对象
     */
    public MyPage<T> getPage() {
        return new MyPage<T>().setCurrent(current).setSize(size);
    }

}
